package com.azure.mapper.bigstore;

import com.azure.entity.TUser;
import com.azure.entity.TUserExample;
import com.azure.entity.TUserKey;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

import net.minidev.json.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface TUserMapper {
    int countByExample(TUserExample example);

    int deleteByExample(TUserExample example);

    int deleteByPrimaryKey(TUserKey key);

    int insert(TUser record);

    int insertSelective(TUser record);

    List<TUser> selectByExample(TUserExample example);

    TUser selectByPrimaryKey(TUserKey key);

    int updateByExampleSelective(@Param("record") TUser record, @Param("example") TUserExample example);

    int updateByExample(@Param("record") TUser record, @Param("example") TUserExample example);

    int updateByPrimaryKeySelective(TUser record);

    int updateByPrimaryKey(TUser record);

    @Select("select addr_sheng province,addr_shi city,count(0) count from t_user group by province,city")
    List<JSONObject> totalDailyReport();

    @Select("select addr_sheng province,count(0) count from t_user  group by province")
    List<JSONObject> totalMonthlyReport();

    List<JSONObject> selectUidProvinceByIds(@Param("uids")List<Long> uids);
}